<template>
  <view class="set-meal-item" @click="onClickItem">
    <image class="img" :src="item.pic_URL"></image>
    <view class="tag" :class="{no: item.isNeedAddCar || item.limiting_Condition_Type === 0}"><text>{{item.isNeedAddCar || item.limiting_Condition_Type === 0 ? '未绑定' : '已绑定'}}</text></view>
    <view class="price-box">
      <text class="price">￥{{item.discount_Price}}<text class="del">￥{{item.normal_Price}}</text></text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      
    }
  },
  props: {
    item: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  created() {
    
  },
  methods: {
    onClickItem() {
      this.$emit('click', this.item)
    }
  }
}
</script>

<style lang="scss">
.set-meal-item{
  margin: 40rpx 26rpx;
  position: relative;
  height: 342rpx;
  box-shadow: 0 0 10rpx 0 rgba(160, 160, 160, 0.35);
  border-radius: 30rpx;
  position: relative;
  overflow: hidden;
  .img{
    width: 100%;
    height: 100%;
    border-radius: 10rpx;
  }
  .tag{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20rpx 0 30rpx;
    height: 54rpx;
    background-color: #3D3D3D;
    border-radius: 0 0 0 54px;
    position: absolute;
    right: 0;
    top: 0;
    font-size: 22rpx;
    color: #FEDD58;
    font-weight: bold;
    &.no{
      background-color: #FF7A8B;
      color: #fff;
    }
  }
  .price-box{
    background-color: #fff;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70rpx;
    padding: 0 25rpx;
    display: flex;
    align-items: center;
    .price{
      font-size: 40rpx;
      color: #333;
      font-weight: bold;
      .del{
        color: #999;
        font-weight: initial;
        font-size: 24rpx;
        margin-left: 8rpx;
        text-decoration: line-through;
      }
    }
  }
  &:first-child{
    margin-top: 20rpx;
  }
}
</style>
